perm filename COREL.DOC[CRE,BGB] blob sn#036840 filedate 1973-04-25 generic text, type T, neo UTF8
00100	              COREL  -  Image Correlation Sub Program.
00200	
00300	                          Bruce g. Baumgart
00400	
00500	
00600	ABSTRACT
00700	
00800		The purpose of this  program  is  to  compute  the  array  of
00900	correlation  values  for  all  possible  different  positions  of one
01000	rectangular image window within another.
01100	
01200		This document is merely an extension of the  code  commentary
01300	and is neither a primer nor an operating manual.
01400	
01500	
01600	
01700	CORRELATION
01800	
01900		Correlation is a function that takes two sets of numbers and
02000	returns a value between -1 and +1.
02100	
02200	COREL Nomensclature
02300	
02400		Probe Window	X-window	R1,C1,M1,N1
02500		Target Window	Y-window	R2,C2,M2,N2
02600		Result Window			 0, 0,DM,DN
02700	
02800		pertaining to Rows:	I,DM,R1,R2,M1,M2
02900		pertaining to Columns:	J,DN,C1,C2,N1,N2
03000	
03100		pertaining to areas SIZ1,SIZ2,N2M1
03200	
03300		Averages	MX, MXX, MXY, MYY, MY
03400		Variance	VX ← MXX - MX*MX
03500				VY ← MYY - MY*MY
03600		Covariance	C  ← MXY - MX*MY
03700		Deviation	SDX← SQRT(VX)
03800				SDY← SQRT(VY)
03900		Correlation	R  ← C/(SDX*SDY)
     

00100	INTERFACE
00200	
00300		COREL is interfaced to the outside world by  second  segments
00400	and   mail.    When   loaded   and   started  COREL  initializes  its
00500	multiplication table, types out an asterisk and waits for a letter.
00600	
00700		When correl receives a letter, it looks for  argument  images
00800	in  second segments *PROBE and *TARGT. The correlation is done and if
00900	required the resulting array is placed in  an  uppper  segment  named
01000	*RSULT,  and a result letter is sent returning control to the calling
01100	job, and COREL waits for another letter.
01200	
01300	
01400	LETTER
01500	
01600		Since the contents of COREL's argument and result letters can
01700	be held in less than 32 words a single letter format is used:
01800	
01900	arguments:
02000		LETTER[0]	calling job's job number.
02100		LETTER[1]	FLG1=0 for auto correlation on probe image
02200			 	FLG1≠0 for cross correlation.
02300		LETTER[2]	FLG2=0 for no result segment.
02400				FLG2≠0 for return result segment.
02500		LETTER[3]	FLG3=0 for leaving the arguments untouched.
02600				FLG3≠0 for snarfing all upper segments.
02700		LETTER[4] thru LETTER[7], R1,C1,M1,N1 of probe window.
02800		LETTER[8] thru LETTER[11], R2,C2,M2,N2 of target window.
02900		LETTER[12]	Threshold.
03000	results:
03100		LETTER[13] and LETTER[14] II,JJ of maximum R.
03200		LETTER[15]	R max.
03300		LETTER[16]	Number of points above threshold.
03500		LETTER[17]	Max radius.
03600		LETTER[18]	Average radius.
03700		LETTER[19]	Runtime.
03800		LETTER[20]	Real Time.